#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2021-08-02 22:25
# @Author : 李中华
# @Email  : 1260429766@qq.com
# @File : readConfig.py
import configparser
from ProjectPath import projectPath
import os

config = configparser.ConfigParser()
path = os.path.join(projectPath,'config','config.ini')
config.read(path,encoding='gbk')

class ReadConfig(object):
    def get_email(self,name):
        value = config.get("EMAIL",name)
        return value
    def get_http(self,name):
        value = config.get("HTTP",name)
        return value
    def get_mysql(self,name):
        value = config.get("DATABASE",name)
        return value

if __name__ == '__main__':
    print(ReadConfig().get_http("serviceUrl"))
    print(ReadConfig().get_email("on_off"))
